package com.motong.gongdan.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.*;
import com.motong.gongdan.vo.system.otherVo.CustomFieldVo;
import com.motong.gongdan.vo.system.processSop.CollectionDataVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;


/**
 * 工序
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("processes")
public class Processes extends PublicPo {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String code;
    private String name;
    private String permissions;
    @TableField(value = "permissions_dep")
    private String permissionsDep;
    @TableField(value = "permissions_name")
    private String permissionsName;
    private BigDecimal rate;
    @TableField(value = "bad_product")
    private String badProduct;
    @TableField(updateStrategy = FieldStrategy.IGNORED, value = "other")
    private String other;
    @TableField(value = "collection_data", updateStrategy = FieldStrategy.NOT_NULL)
    private String collectionData;

    @ApiModelProperty("计价方式(0 计件, 1 计时)")
    @TableField(value = "pricing_method", updateStrategy = FieldStrategy.IGNORED)
    private Integer pricingMethod;

    @ApiModelProperty("二维码")
    @TableField("qr")
    private String qr;

    @TableField(exist = false)
    private List<CollectionDataVo> vos;

    @TableField(exist = false)
    private String badProductName;

    @TableField(exist = false)
    private BigDecimal planNum; //计划数
    @TableField(exist = false)
    private BigDecimal goodNum; //良品数
    @TableField(exist = false)
    private BigDecimal badNum; //不良数

    @TableField(exist = false)
    private String depIds;
    @TableField(exist = false)
    private String userIds;

    @TableField(exist = false)
    private List<CustomFieldVo> customFieldVos;

    @TableField(exist = false)
    private JSONArray customFieldMess;
}
